//
//  SystemHelp.m
//  cutter
//
//  Created by mac on 16/4/6.
//  Copyright © 2016年 e360. All rights reserved.
//

#import "SystemHelp.h"
@interface SystemHelpCell : UITableViewCell
@property (weak, nonatomic) IBOutlet UILabel *nameView;
@end
@implementation SystemHelpCell
-(void)setSelected:(BOOL)selected animated:(BOOL)animated{
    [super setSelected:selected animated:animated];
    if (self.selected) {
        [self.nameView setTextColor:[UIColor colorWithHex:0x4794EF]];
        [self setBackgroundColor:[UIColor colorWithHex:0xF6F9FE]];
    }else{
        [self.nameView setTextColor:[UIColor colorWithHex:0x4A4A4A]];
        [self setBackgroundColor:[UIColor whiteColor]];
    }
}
@end


//
@implementation SystemHelp

-(void)viewDidLoad {
    [super viewDidLoad];
    //
    [self.data addObject:@"新建客户"];
    [self.data addObject:@"关于收藏"];
    [self.data addObject:@"添加购物车"];
    [self.data addObject:@"如何下单"];
    [self.data addObject:@"升级与下载"];
    [self.data addObject:@"设计搭配教程"];
    [self.data addObject:@"空间方案教程"];
    [self.data addObject:@"户型沙盘教程"];
}
-(NSMutableArray *)data{
    if (_data == nil) {
        [self setData:[NSMutableArray array]];
    }
    return _data;
}
//
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    return [self.data count];
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    NSString *name = [self.data objectAtIndex:indexPath.row];
    SystemHelpCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cellIdentifier"];
    [cell.nameView setText:name];
    return cell;
}

@end
